﻿<!DOCTYPE html>
<html>
<head>
    <title>for语句的应用示例</title>
</head>
<body>
    <script>
        for (let i = 0, iSum = 0; i <= 100; i++) {
            iSum += i;
        }
        document.write("1-100的所有数之和为" + iSum);
    </script>
</body>
</html>
